/* blank.cpp */

#include <dodo_plot/widget/blank.h>
#include <dodo_plot/kernel/canvas.h>
#include <dodo_plot/kernel/basic_utils.h>
#include <dodo_plot/kernel/plotter.h>
#include <cairomm/cairomm.h>

namespace dodo_plot
{

void Blank::draw(const Plotter& plotter) const
{
	plotter.save();
	plotter.begin_new_path();
	plotter.rectangle(Position(0, width(), 0, height()));
	if(opaque_)  //draw with white
	{
		plotter.set_color(color_name::WHITE);
		plotter.fill_preserve();
	}
	plotter.set_color(c_);
	plotter.fill_preserve();
	if(border_color_ != color_name::TRANSPARENT)
	{
		plotter.set_line_width(border_width_);
		plotter.set_color(border_color_);
		plotter.stroke();
	}
	plotter.restore();
}


}
